package cn.gov.msa.util;
 /**
  * 线程池
  *
  *@author     lee
  *@version    1.0
  *@since      JDK 1.8.0
  *@create     2017-09-01 14:39:29
  *<p>Copyright:   Copyrighy(c) 2017</p>
  *<p>Company:     中云远景</p>  
  */
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

public class MultiTaskService {
    private ThreadPoolExecutor executor;
    
    public MultiTaskService() {
    	executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(5);
    }
    
    public void executorTask(Runnable task) {
    	executor.execute(task);
    }
    public void clean() {
    	executor.shutdown();
    }
}
